
#ifndef UpdateSpeedCounter_hpp
#define UpdateSpeedCounter_hpp

#include <stdio.h>
#include <deque>

class UpdateSpeedCounter
{
public:
    UpdateSpeedCounter();

    void startSpeedCounter();

    void stopSpeedCounter();

    void setSize(size_t size);

    void speedCounter(float dt);

    size_t getSpeed();

    size_t getCurrentSpeed();
private:
    size_t _currentSize ;
    size_t _lastCurrentSize ;
    std::deque<size_t> _speedCountList;
    size_t _speed ;
    bool _doTimer ;
    float _timer;
};
#endif

